Custom events that trigger action from field changes
Custom rules events in the Rules Manager can execute notifications or other actions based on field changes within the system. Particularly advantageous for system administrators, this feature provides an excellent way to keep you in the know if particularly sensitive fields are changed, or to execute other actions in response to certain fields being changed.
Please keep in mind that this article assumes a working knowledge of how to create rules in the Rules Manager. Check out the How to Use the Rules Manager article for more.
There are two different Field Change commands you can use in conjunction with Custom events:
- Field Change:[Field Name] - This command triggers action when a single field is changed. This is typically used in conjunction with a Notification or Email action, so that you can be informed about a particular field change. For example, administrators often use this command so they can be informed when the Target Date or Priority fields on a Work Order are changed from their original value.
- Field Change:All - This command triggers action when a record is changed and then saved. This is typically used in conjunction with the Run Database Script action, so that a SQL-scripted action can be executed in response to a record being changed. For example, you could run a database script whenever Work Orders of a certain type are modified at all.
Note: The Custom events only work for the major tables found in Maintenance Connection (Work Order, Asset, etc).
- Access the Rules Manager by going to Tools>Rules Manager.
- Create a new Rule, selecting the desired Custom rule event.
- Once the desired Custom event has been selected, insert the desired Field Change command into the Event Definition field. As mentioned above, you can insert "Field Change:[Field Name]" for particular fields, or "Field Change:All" for any field changes on a particular record. It is important to ensure there is no space after Field Change.
- Set the Criteria as needed. For example, you may want to be notified of a Target Date change on all Work Orders of a specific type.
- Set the desired action on the Actions tab. For example, we can ensure any Target Date change to Emergency Work Orders (see screenshots above) will result in a Notification being sent to the system administrator.
- Define the action as needed, and then save the new rule.
As mentioned above, this article assumes a basic knowledge of the Rules Manager. Check out the rest of the articles in this section of the Knowledge Base for more information on how to use this powerful tool.